import request from '@/utils/request'

// 创建积分用途
export function createScoreType(data) {
  return request({
    url: '/member/score-type/create',
    method: 'post',
    data: data
  })
}

// 更新积分用途
export function updateScoreType(data) {
  return request({
    url: '/member/score-type/update',
    method: 'put',
    data: data
  })
}

// 删除积分用途
export function deleteScoreType(id) {
  return request({
    url: '/member/score-type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得积分用途
export function getScoreType(id) {
  return request({
    url: '/member/score-type/get?id=' + id,
    method: 'get'
  })
}

// 获得积分用途分页
export function getScoreTypePage(query) {
  return request({
    url: '/member/score-type/page',
    method: 'get',
    params: query
  })
}

// 导出积分用途 Excel
export function exportScoreTypeExcel(query) {
  return request({
    url: '/member/score-type/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
